<style>
<!--
td
{
text-align:center;
}
-->
</style>
<?php 
defined('_JEXEC') or die('Restricted access');
$param=$this->param;
AdminUIHelper::startAdminArea ();
?>
<form name='adminForm' action='index.php?option=com_svquanlycanbo&view=useraccount' method='post'>
	<input type='hidden' name='task' />
	<input type="hidden" name="boxchecked" value="0" />
	<div id="editcell">
		<table>
		<tbody><tr>
				<td nowrap="nowrap">
					<?php 
					//echo JHTML::_('select.genericlist',$this->array,'age_id','class="inputbox", onchange="submitform()"','key','text',$value['age']); 
					echo $this->list['donvi'];
					echo $this->list['phongban'];
					echo $this->list['canbo'];
					echo ' Number record : '.$this->total;
					?>
				</td>
		</tr>
		</tbody>
	</table>
		<table class='adminlist'>
			<thead>
				<tr>
					<th width="50">#</th>
					<th width="50"><input type="checkbox" name="toggle" value="" onclick="checkAll(10);"></th>
					<th width="150">Tên cán bộ</th>
					<th width="150">User name</th>
					<th width="150">Login as</th>
					<th width="150">Quyền truy cập</th>
					<th width="150">Email</th>
					<th width="150">Tên phòng</th>
					<th width="50">ID</th>
				</tr>
			</thead>
			<tbody>
				<?php 
					$i=0;
					$k=0;
					foreach($this->dataObject as $record)
					{
						$typeaccount=$record->ac_typeaccount;
						$typeaname='';
						switch($typeaccount)
						{
							case 'canbo' : $typeaname='Nhân viên'; break;
							case 'qlphong' : $typeaname='Quản trị phòng ban'; break;
							case 'qldonvi' : $typeaname='Quản trị đơn vị'; break;
							case 'admin' : $typeaname='Admin'; break;
							default: break;
						}
						$checked     = JHTML::_('grid.id',   $k , $record->id);
						$k=$k+1;
						echo '<tr class="row'.$i.'">';
							echo '<td width="50">'.$k.'</td>';
							echo '<td width="50">'.$checked.'</td>';
							echo '<td width="150">'.$record->cb_ten.'</td>';
							echo '<td width="150">'.$record->username.'</td>';
							echo '<td width="150">'.$record->usertype.'</td>';
							echo '<td width="150">'.$typeaname.'</td>';
							echo '<td width="150">'.$record->email.'</td>';
							echo '<td width="150">'.$record->pb_ten.'</a></td>';
							echo '<td width="50">'.$record->id.'</td>';
						echo '</tr>';
						$i=1-$i;	
					}

				?>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="9">
						<?php echo $this->pager->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
		</table>
	</div>
</form>